home *** CD-ROM | disk | FTP | other *** search
/ La Traviata / La Traviata.iso / viewer / grabsc11.zip / TSR.H < prev    next >
C/C++ Source or Header  |  1990-09-14  |  1KB  |  20 lines

  1. /******************************************************************************
  2. * Simple routines to set up a program as TSR, by hooking the keyboard          *
  3. * interrupt locally and testing the scancodes against given scancode hot key. *
  4. * This module was tested in TINY model only.                      *
  5. *                                          *
  6. *                    Written By Gershon Elber, June 1989   *
  7. ******************************************************************************/
  8.  
  9. /* Scan code is specified as follows:                         */
  10. /* highbyte - scan code of keyboard key (as given to interrupt 9).         */
  11. /* lowbyte  - shift mask: Right shift - bit 1, Left shift - bit 2,         */
  12. /*                            Ctl - bit2, Atl - bit 3. */
  13. /* Func is the function to execute as the TSR process.                 */
  14. /* Returns: 0 if O.k., 1 if already installed, 2 install failed.         */
  15. int HookKbdInterrupt(void (*Func)(), unsigned int ScanCode);
  16.  
  17. /* If HookKbdInterrupt returns 1 (already installed), _InstalledTSRSegment   */
  18. /* is set to the installed version segment, so variables in the installed    */
  19. /* version may be changed (remember offset are the same!).             */
  20. extern unsigned int InstalledTSRSegment;